Skip to content

fix(dream-cli): template apply resilience + restart cache invalidation#935

Merged
Lightheartdevs merged 1 commit intoLight-Heart-Labs:mainfrom
yasinBursali:combine/dream-cli-fixes
Apr 18, 2026
Merged

fix(dream-cli): template apply resilience + restart cache invalidation#935
Lightheartdevs merged 1 commit intoLight-Heart-Labs:mainfrom
yasinBursali:combine/dream-cli-fixes

Conversation

@yasinBursali
Copy link
Copy Markdown
Contributor

@yasinBursali yasinBursali commented Apr 12, 2026

Merge order: Merge after #909, #926, and #907 — all modify extensions.py and/or dream-cli.

Combined PR replacing #903 and #904. See commit message.

Replaces: #903, #904

Copy link
Copy Markdown
Collaborator

@Lightheartdevs Lightheartdevs left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Three reasonable fixes bundled:

  1. docker compose restartdocker compose up -d: correct. restart reuses the existing container (baked env); up -d recreates with fresh env from .env. This is the canonical way to pick up model/config changes.

  2. ( cmd_enable "$svc" ) subshell in template apply: isolates set -euo pipefail so one service failure doesn't kill the loop. The || warn already handles the failure message — the subshell is needed to make it actually work. Subtle but correct.

  3. Fallback to resolve-compose-stack.sh in dream-macos.sh: good — when .compose-flags cache is missing, falling through to static overlay list would miss user-installed extensions. Delegating to the resolver fixes that.

All three are small, correct, and well-motivated. Ship.

Combines two dream-cli and extensions-related fixes:

1. Template apply exit trap (Light-Heart-Labs#903): wrap cmd_enable in a subshell inside
   _template_apply so a failing extension doesn't abort the entire
   template — the loop continues to the next service.

2. Restart + cache invalidation (Light-Heart-Labs#904): dream-cli restart uses
   docker compose up -d (recreates containers) instead of restart
   (which doesn't pick up .env changes). macOS dream-macos.sh gets
   dynamic compose flag resolution. Extensions enable endpoint
   invalidates .compose-flags cache on stopped-start path so dream-cli
   picks up the newly-enabled extension.

Replaces: Light-Heart-Labs#903, Light-Heart-Labs#904
@Lightheartdevs Lightheartdevs force-pushed the combine/dream-cli-fixes branch from 6853228 to 74df78a Compare April 18, 2026 18:27
@Lightheartdevs Lightheartdevs merged commit df9cd57 into Light-Heart-Labs:main Apr 18, 2026
27 of 28 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants